package abstracttransactions

import (
	"salary/model"
)

/*
 * 更改雇员类别
 */

type ChangeClassificationTransaction struct {
	ChangeEmployeeTransaction
	Classification
	Schedule
}

type Classification interface {
	GetClassification() model.PaymentClassification
}

type Schedule interface {
	GetSchedule() model.PaymentSchedule
}

func (cct *ChangeClassificationTransaction) Change(employee *model.Employee) {
	pc := cct.Classification.GetClassification()
	employee.SetClassification(pc)

	ps := cct.Schedule.GetSchedule()
	employee.SetSchedule(ps)
}
